--[7-1] undefine vname select last_name, hire_date from employees where department_id = (select department_id from employees where last_name = '&&vname') and last_name <> '&vname'; --exclude the value of vname --[7-2] select employee_id, last_name, salary from employees --where salary > (select round(avg(salary))from employees) --where salary > 6461.831775700934579439252336448598130841 where salary > 6462 order by salary; --[7-3] select employee_id, last_name from employees where department_id in (30,50,80,60); (select /*distinct*/ department_id, last_name from employees where last_name like '%u%' and last_name like '%C%') order by last_name; --[7-4] select last_name, department_id, job_id from employees where department_id in (select distinct department_id from departments where location_id=1700); select last_name, department_id, job_id from employees where department_id in (select distinct department_id from departments where location_id=&v);--1800 --[7-5] select employee_id,last_name, salary, manager_id from employees --where manager_id = any (100,156); where manager_id in --(100,156); (select employee_id from employees where last_name = 'King'); --[7-6] select department_id, last_name, job_id from employees where department_id = all (90); where department_id = any (90); where department_id = (90); where department_id in (90); where department_id in (select department_id from departments where department_name = 'Executive'); --[7-7] select employee_id, last_name,salary,department_id from employees --where department_id in where department_id =any --(select distinct department_id from employees where last_name like '%u%' ) (30,50,80,60) --AND salary >(select round(avg(salary)) from employees); AND salary >(6462);